﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

namespace ASPNet.App_Code
{
    public class Category
    {
        /*public string _connString;
    
            public List<T> GetCategories()
            {
                List<T> categories = null;
    
                if (Cache["Categories"] != null)
                {
                    categories = (List<T>)Cache["Categories"];
    
                }
                else
                {
                    using (SqlConnection conn = new SqlConnection(_connString))
                    {
                        SqlCommand cmd = new SqlCommand("SELECT * FROM TB_CATEGORIES", conn);
                        categories = cmd.ExecuteReader();
    
                        SqlCacheDependency dep = new SqlCacheDependency("Category-Cache", "TB_CATEGORY");
                        Cache.Insert("Categories", categories, dep);
                    }
                }
            }
        }*/
    }
}